import request from '@/utils/request'

// 查询产品采购信息列表
export function listPurchase(query) {
    return request({
        url: '/product/purchase/list',
        method: 'get',
        params: query
    })
}

// 查询产品采购信息详细
export function getPurchase(id) {
    return request({
        url: '/product/purchase/' + id,
        method: 'get'
    })
}

// 新增产品采购信息
export function addPurchase(data) {
    return request({
        url: '/product/purchase',
        method: 'post',
        data: data
    })
}

// 修改产品采购信息
export function updatePurchase(data) {
    return request({
        url: '/product/purchase',
        method: 'put',
        data: data
    })
}

// 删除产品采购信息
export function delPurchase(id) {
    return request({
        url: '/product/purchase/' + id,
        method: 'delete'
    })
}
